<template>
  <div>
    <Descriptions :schema="schema" :data="currentRow || {}" />
  </div>
</template>
<script setup lang="tsx">
import { PropType, reactive } from 'vue'
import type { EmployeeData } from '@/api/table/types'
import { Descriptions, DescriptionsSchema } from '@/components/Descriptions'
import { useI18n } from '@/hooks/web/useI18n'

defineProps({
  currentRow: {
    type: Object as PropType<Nullable<EmployeeData>>,
    default: () => null
  }
})

const { t } = useI18n()

const schema = reactive<DescriptionsSchema[]>([
  {
    field: 'empId',
    label: '员工ID',
    span: 24
  },
  {
    field: 'firstName',
    label: '名'
  },
  {
    field: 'lastName',
    label: '姓'
  },
  {
    field: 'email',
    label: '邮箱'
  },
  {
    field: 'phoneNumber',
    label: '电话'
  },
  {
    field: 'hireDate',
    label: '入职日期'
  },
  {
    field: 'jobTitle',
    label: '工作名'
  },
  {
    field: 'salary',
    label: '工资'
  }
])


</script>
<style lang="scss" scoped>
</style>